<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.0/css/jquery.dataTables.css">

<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>

<script type="text/javascript" language="javascript" class="init">

$(document).ready(function() {
   oTable = $('#product_table').dataTable();
} );
	</script>
</head>

<body style="font-family:Arial, Helvetica, sans-serif">
<table width="1000" border="1" cellspacing="0" cellpadding="10" id="product_table">
  <thead>
  <tr>
    <th scope="col">No</th>
    <th scope="col">Code</th>
    <th scope="col">Des</th>
    <th scope="col">Total BO</th>
    <th scope="col">Total Shop</th>
    <th scope="col">Shop Detail</th>
    
  </tr>
  </thead>
    <tfoot>
  <tr>
    <th scope="col">No</th>
    <th scope="col">Code</th>
    <th scope="col">Des</th>
    <th scope="col">Total BO</th>
    <th scope="col">Total Shop</th>
    <th scope="col">Shop Detail</th>
    
  </tr>
  </tfoot>
  <tbody>
<?php 
$rProduct = new Model_DbTable_Pr_Prproducts();
foreach($this->arrParts  as $k => $v){?>  
  <tr>
  	<td><?php echo $k + 1;?> </td>
    <td><?php echo $v[0]?></td>
    <td><?php 
    echo $rProduct->getProductDes($v[0]);
    
    ?></td>
    <td><?php echo $v[1]?></td>
    <td><?php echo count($v[2])?></td>
    <td><?php 
	foreach($v[2] as $k2 => $v2){
		echo "Shop ".$v2[0].":".$v2[1]."<br />"; 	
	}
	?></td>
  </tr>
<?php }?>  
</tbody>
</table>
</body>
</html>
